package com.sunthy.mall.listenter;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.SessionTrackingMode;
import javax.servlet.annotation.WebListener;
import java.util.HashSet;

/**
 *@Description:  监听器
 *@Author: XM
 */
@WebListener
public class MallLisenter implements ServletContextListener {
    @Override
    public void contextInitialized(ServletContextEvent servletContextEvent) {
        ServletContext servletContext = servletContextEvent.getServletContext();
        HashSet<SessionTrackingMode> sessionTrackingModes = new HashSet<SessionTrackingMode>();
        servletContext.setSessionTrackingModes(sessionTrackingModes);
    }

    @Override
    public void contextDestroyed(ServletContextEvent servletContextEvent) {

    }
}
